#include "PlatformElement.hpp"

PlatformElement::PlatformElement(const b2Vec2* vertices, int numberOfVertices, b2World* world) {
    b2BodyDef bodyDefinition;
    bodyDefinition.userData = this;

    b2ChainShape shape;
    shape.CreateChain(vertices, numberOfVertices);

    this->body = world->CreateBody(&bodyDefinition);
    this->body->CreateFixture(&shape, 0.0f);
}

bool PlatformElement::isPlatform() {
    return true;
}
